home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / indnt16b.zoo / indent.txt < prev    next >
Encoding:
Text File  |  1992-08-25  |  36.0 KB  |  991 lines

  1.  
  2.  
  3. INDENT (1L)            Commands and Applications             INDENT (1L)
  4.  
  5.  
  6.  
  7.  
  8. NAME         
  9.         indent  -  changes the appearance of a C program by inserting or
  10.         deleting whitespace.  
  11.  
  12. SYNOPSIS         
  13.         indent [-bad] [-bap] [-bbb] [-bc] [-bl] [-bliN] [-br] [-cN] [-cdN] [-cdb]
  14.             [-ce] [-ciN] [-cliN] [-cpN] [-cs] [-bs] [-dN] [-diN] [-fc1] [-fca]
  15.             [-gnu] [-iN] [-ipN] [-kr] [-lN] [-lp] [-nbad] [-nbap] [-nbbb]
  16.             [-nbc] [-ncdb] [-nce] [-ncs] [-nfc1] [-nfca] [-nip] [-nlp] [-npcs]
  17.             [-npsl] [-nsc] [-nsob] [-nss] [-nv] [-orig] [-npro] [-pcs] [-psl]
  18.             [-sc] [-sob] [-ss] [-st] [-T] [-tsN] [-v] [-version] [file]
  19.  
  20. DESCRIPTION         
  21.         This man page is based on the Info file indent.info, produced by 
  22.         Makeinfo-1.47 from the input file indent.texinfo.  This is 
  23.         Edition 0.02, 5 May 1992, of The `indent' Manual, for Indent 
  24.         Version 1.3.  
  25.         Copyright (C) 1989, 1992 Free Software Foundation, Inc.  
  26.  
  27. COPYING         
  28.         Permission is granted to make and distribute verbatim copies of 
  29.         this manual provided the copyright notice and this permission 
  30.         notice are preserved on all copies.  
  31.  
  32. INTRODUCTION         
  33.         The `indent' program can be used to make code easier to read.  
  34.         It can also convert from one style of writing C to another.  
  35.         `indent' understands a substantial amount about the syntax of C, 
  36.         but it also attempts to cope with incomplete and misformed 
  37.         syntax.  
  38.         In version 1.2 and more recent versions, the GNU style of 
  39.         indenting is the default.  
  40.  
  41. INVOKING INDENT         
  42.         As of version 1.3, the format of the `indent' command is: 
  43.              indent [OPTIONS] [INPUT-FILES] 
  44.              indent [OPTIONS] [SINGLE-INPUT-FILE] [-o OUTPUT-FILE] 
  45.         This format is different from earlier versions and other 
  46.         versions of `indent'.  
  47.         In the first form, one or more input files are specified.  
  48.         `indent' makes a backup copy of each file, and the original file 
  49.         is replaced with its indented version.  *Note Backup files::, 
  50.         for an explanation of how backups are made.  
  51.         In the second form, only one input file is specified.  In this 
  52.         case, or when the standard input is used, you may specify an 
  53.         output file after the `-o' option.  
  54.         To cause `indent' to write to standard output, use the `-st' 
  55.         option.  This is only allowed when there is only one input file, 
  56.         or when the standard input is used.  
  57.         If no input files are named, the standard input is read for 
  58.         input.  Also, if a filename named `-' is specified, then the 
  59.         standard input is read.  
  60.         As an example, each of the following commands will input the 
  61.  
  62.  
  63.  
  64. Tue Aug 25 13:35:43 1992                                          Page 1
  65.  
  66.  
  67.  
  68.  
  69. INDENT (1L)            Commands and Applications             INDENT (1L)
  70.  
  71.  
  72.  
  73.         program `slithy_toves.c' and write its indented text to 
  74.         `slithy_toves.out': 
  75.              indent slithy_toves.c -o slithy_toves.out 
  76.              indent -st slithy_toves.c > slithy_toves.out 
  77.              cat slithy_toves.c | indent -o slithy_toves.out 
  78.         Most other options to `indent' control how programs are 
  79.         formatted.  As of version 1.2, `indent' also recognizes a long 
  80.         name for each option name.  Long options are prefixed by either 
  81.         `--' or `+'. `+' is being superseded by `--' to maintain 
  82.         consistency with the POSIX standard.  In most of this document, 
  83.         the traditional, short names are used for the sake of brevity.  
  84.         Here is another example: 
  85.              indent -br test/metabolism.c -l85 
  86.         This will indent the program `test/metabolism.c' using the `-br' 
  87.         and `-l85' options, write the output back to 
  88.         `test/metabolism.c', and write the original contents of 
  89.         `test/metabolism.c' to a backup file in the directory `test'.  
  90.         Equivalent invocations using long option names for this example 
  91.         would be: 
  92.              indent --braces-on-if-line --line-length185 
  93.              test/metabolism.c 
  94.              indent +braces-on-if-line +line-length185 test/metabolism.c 
  95.         If you find that you often use `indent' with the same options, 
  96.         you may put those options into a file called `.indent.pro'. 
  97.         `indent' will first look for `.indent.pro' in the current 
  98.         directory and use that if found.  Otherwise, `indent' will 
  99.         search your home directory for `.indent.pro' and use that file 
  100.         if it is found.  This behaviour is different from that of other 
  101.         versions of `indent', which load both files if they both exist.  
  102.         Command line switches are handled *after* processing 
  103.         `.indent.pro'.  Options specified later override arguments 
  104.         specified earlier, with one exception: Explicitly specified 
  105.         options always override background options (*note Common 
  106.         styles::.).  You can prevent `indent' from reading an 
  107.         `.indent.pro' file by specifying the `-npro' option.  
  108.  
  109. BACKUP FILES         
  110.         As of version 1.3, GNU `indent' makes GNU--style backup files, 
  111.         the same way GNU Emacs does.  This means that either "simple" or 
  112.         "numbered" backup filenames may be made.  
  113.         Simple backup file names are generated by appending a suffix to 
  114.         the original file name.  The default for the this suffix is the 
  115.         one-character string `~' (tilde). Thus, the backup file for 
  116.         `python.c' would be `python.c~'.  
  117.         Instead of the default, you may specify any string as a suffix 
  118.         by setting the environment variable `SIMPLE_BACKUP_SUFFIX' to 
  119.         your preferred suffix.  
  120.         Numbered backup versions of a file `momewraths' look like 
  121.         `momewraths.c.~23~', where 23 is the version of this particular 
  122.         backup.  When making a numbered backup of the file 
  123.         `src/momewrath.c', the backup file will be named 
  124.         `src/momewrath.c.~V~', where V is one greater than the highest 
  125.         version currently existing in the directory `src'.  
  126.         The type of backup file made is controlled by the value of the 
  127.  
  128.  
  129.  
  130. Tue Aug 25 13:35:43 1992                                          Page 2
  131.  
  132.  
  133.  
  134.  
  135. INDENT (1L)            Commands and Applications             INDENT (1L)
  136.  
  137.  
  138.  
  139.         environment variable `VERSION_CONTROL'. If it is the string 
  140.         `simple', then only simple backups will be made.  If its value 
  141.         is the string `numbered', then numbered backups will be made.  
  142.         If its value is `numbered-existing', then numbered backups will 
  143.         be made if there *already exist* numbered backups for the file 
  144.         being indented; otherwise, a simple backup is made.  If 
  145.         `VERSION_CONTROL' is not set, then `indent' assumes the 
  146.         behaviour of `numbered-existing'.  
  147.         Other versions of `indent' use the suffix `.BAK' in naming 
  148.         backup files.  This behaviour can be emulated by setting 
  149.         `SIMPLE_BACKUP_SUFFIX' to `.BAK'.  
  150.         Note also that other versions of `indent' make backups in the 
  151.         current directory, rather than in the directory of the source 
  152.         file as GNU `indent' now does.  
  153.  
  154. COMMON STYLES         
  155.         There are several common styles of C code, including the GNU 
  156.         style, the Kernighan & Ritchie style, and the original Berkeley 
  157.         style.  A style may be selected with a single "background" 
  158.         option, which specifies a set of values for all other options.  
  159.         However, explicitly specified options always override options 
  160.         implied by a background option.  
  161.         As of version 1.2, the default style of GNU `indent' is the GNU 
  162.         style.  Thus, it is no longer neccessary to specify the option 
  163.         `-gnu' to obtain this format, although doing so will not cause 
  164.         an error.  Option settings which correspond to the GNU style 
  165.         are: 
  166.              -nbad -bap -nbbb -nbc -bl -bli2 -c33 -cd33 -ncdb -nce -cli0 
  167.              -cp1 -di0 -nfc1 -nfca -i2 -ip5 -lp -pcs -psl -nsc -nsob 
  168.              -nss -ts8 
  169.         The GNU coding style is that preferred by the GNU project.  It 
  170.         is the style that the GNU Emacs C mode encourages and which is 
  171.         used in the C portions of GNU Emacs. (People interested in 
  172.         writing programs for Project GNU should get a copy of `The GNU 
  173.         Coding Standards', which also covers semantic and portability 
  174.         issues such as memory usage, the size of integers, etc.) 
  175.         The Kernighan & Ritchie style is used throughout their 
  176.         well-known book `The C Programming Language'. It is enabled with 
  177.         the `-kr' option.  The Kernighan & Ritchie style corresponds to 
  178.         the following set of options: 
  179.              -nbad -bap -nbbb -nbc -br -c33 -cd33 -ncdb -ce -ci4 -cli0 
  180.              -cp33 -d0 -di1 -nfc1 -nfca -i4 -ip0 -l75 -lp -npcs -npsl 
  181.              -nsc -nsob -nss -ts8 
  182.         Kernighan & Ritchie style does not put comments to the right of 
  183.         code in the same column at all times (nor does it use only one 
  184.         space to the right of the code), so for this style `indent' has 
  185.         arbitrarily chosen column 33.  
  186.         The style of the original Berkeley `indent' may be obtained by 
  187.         specifying `-orig' (or by specifyfying `--original', using the 
  188.         long option name).  This style is equivalent to the following 
  189.         settings: 
  190.              -nbap -nbad -nbbb -bc -br -c33 -cd33 -cdb -ce -ci4 -cli0 
  191.              -cp33 -d4 -di16 -fc1 -fca -i4 -ip4 -l75 -lp -npcs -psl -sc 
  192.              -nsob -nss -ts8 
  193.  
  194.  
  195.  
  196. Tue Aug 25 13:35:43 1992                                          Page 3
  197.  
  198.  
  199.  
  200.  
  201. INDENT (1L)            Commands and Applications             INDENT (1L)
  202.  
  203.  
  204.  
  205. BLANK LINES         
  206.         Various programming styles use blank lines in different places.  
  207.         `indent' has a number of options to insert or delete blank lines 
  208.         in specific places.  
  209.         The `-bad' option causes `indent' to force a blank line after 
  210.         every block of declarations.  The `-nbad' option causes `indent' 
  211.         not to force such blank lines.  
  212.         The `-bap' option forces a blank line after every procedure 
  213.         body.  The `-nbap' option forces no such blank line.  
  214.         The `-bbb' option forces a blank line before every block 
  215.         comment.  A block comment is one which starts in column one when 
  216.         formatting of such comments is disabled, or one with `-' or `*' 
  217.         immediately following the `/*'. The `-nbbb' option does not 
  218.         force such blank lines.  
  219.         The `-sob' option causes `indent' to swallow optional blank 
  220.         lines (that is, any optional blank lines present in the input 
  221.         will be removed from the output).  If the `-nsob' is specified, 
  222.         any blank lines present in the input file will be copied to the 
  223.         output file.  
  224.         The `-bad' option forces a blank line after every block of 
  225.         declarations.  The `-nbad' option does not add any such blank 
  226.         lines.  
  227.         For example, given the input 
  228.                   char *foo;
  229.                   char *bar;
  230.                   /* This separates blocks of declarations.  */
  231.                   int baz;
  232.              
  233.         `indent -bad' produces 
  234.                   char *foo;
  235.                   char *bar;
  236.                   
  237.                   /* This separates blocks of declarations.  */
  238.                   int baz;
  239.              
  240.         and `indent -nbad' produces 
  241.                   char *foo;
  242.                   char *bar;
  243.                   /* This separates blocks of declarations.  */
  244.                   int baz;
  245.              
  246.         The `-bap' option forces a blank line after every procedure 
  247.         body.  For example, given the input 
  248.                   int
  249.                   foo ()
  250.                   {
  251.                     puts("Hi");
  252.                   }
  253.                   /* The procedure bar is even less interesting.  */
  254.                   char *
  255.                   bar ()
  256.                   {
  257.                     puts("Hello");
  258.                   }
  259.  
  260.  
  261.  
  262. Tue Aug 25 13:35:43 1992                                          Page 4
  263.  
  264.  
  265.  
  266.  
  267. INDENT (1L)            Commands and Applications             INDENT (1L)
  268.  
  269.  
  270.  
  271.              
  272.         `indent -bap' produces 
  273.                   int
  274.                   foo ()
  275.                   {
  276.                     puts ("Hi");
  277.                   }
  278.                   
  279.                   /* The procedure bar is even less interesting.  */
  280.                   char *
  281.                   bar ()
  282.                   {
  283.                     puts ("Hello");
  284.                   }
  285.              
  286.         and `indent -nbap' produces 
  287.                   int
  288.                   foo ()
  289.                   {
  290.                     puts ("Hi");
  291.                   }
  292.                   /* The procedure bar is even less interesting.  */
  293.                   char *
  294.                   bar ()
  295.                   {
  296.                     puts ("Hello");
  297.                   }
  298.              
  299.         No blank line will be added after the procedure `foo'.  
  300.  
  301. COMMENTS         
  302.         Comments are no longer formatted by default as of version 1.2. 
  303.         This can be enabled with the `-fca' option.  Doing so will cause 
  304.         newlines in the comment text to be ignored and the line will be 
  305.         filled up to the length of a line (which can be modified with 
  306.         `-l'). When formatting is enabled, blank lines indicate 
  307.         paragraph breaks.  
  308.         The `-fc1' option enables the formatting of comments which begin 
  309.         in the first column.  The `-nfc1' option disables the formatting 
  310.         of first column comments.  When comment formatting is disabled, 
  311.         overall comment indentation may still be adjusted.  
  312.         The indentation of comments which do not appear to the right of 
  313.         code is set by the `-d' option, which specifies the number of 
  314.         spaces to the left of the surrounding code that the comment 
  315.         appears.  For example, `-d2' places comments two spaces to the 
  316.         left of code; `-d0' lines up comments with the code.  The `-cdb' 
  317.         option controls whether the `/*' and `*/' are placed on blank 
  318.         lines.  With `-cdb', comments look like this: 
  319.                   /*
  320.                    * this is a comment
  321.                    */
  322.              
  323.         With `-ncdb', comments look like this: 
  324.                   /* this is a comment */
  325.  
  326.  
  327.  
  328. Tue Aug 25 13:35:43 1992                                          Page 5
  329.  
  330.  
  331.  
  332.  
  333. INDENT (1L)            Commands and Applications             INDENT (1L)
  334.  
  335.  
  336.  
  337.              
  338.         `-cdb' only affects block comments, not comments to the right of 
  339.         code.  The default is `-ncdb'.  
  340.         Comments which appear on the same line as code are placed to the 
  341.         right.  The column in which comments on code start is controlled 
  342.         by the `-c' option.  The column in which comments to the right 
  343.         of declarations start is controlled by the `-cd' option.  By 
  344.         default, they start in the same column as comments to the right 
  345.         of code, which is column 33. The column number for comments to 
  346.         the right of `#else' and `#endif' statements is controlled by 
  347.         the `-cp' option.  If the code on a line extends past the 
  348.         comment column, the comment starts further to the right, and the 
  349.         right margin may be automatically extended in extreme cases.  
  350.         If the `-sc' option is specified, `*' is placed at the left edge 
  351.         of all comments.  For example: 
  352.                   /* This is a comment which extends from one line
  353.                    * onto the next line, thus causing us to consider
  354.                    * how it should continue.  */
  355.              
  356.         instead of 
  357.                   /* This is a comment which extends from one line
  358.                      onto the next line, thus causing us to consider
  359.                      how it should continue.  */
  360.              
  361.  
  362. STATEMENTS         
  363.         The `-br' or `-bl' option specifies how to format braces.  The 
  364.         `-br' option formats braces like this: 
  365.                   if (x > 0) {
  366.                     x--;
  367.                   }
  368.              
  369.         The `-bl' option formats them like this: 
  370.                   if (x > 0)
  371.                     {
  372.                       x--;
  373.                     }
  374.              
  375.         If you use the `-bl' option, you may also want to specify the 
  376.         `-bli' option.  This option specifies the number of spaces by 
  377.         which braces are indented.  `-bli2', the default, gives the 
  378.         result shown above.  `-bli0' results in the following: 
  379.                   if (x > 0)
  380.                   {
  381.                     x--;
  382.                   }
  383.              
  384.         If you are using the `-br' option, you probably want to also use 
  385.         the `-ce' option.  This causes the `else' in an if-then-else 
  386.         construct to cuddle up to the immediately preceding `}'. For 
  387.         example, with `-br -ce' you get the following: 
  388.                   if (x > 0) {
  389.                     x--;
  390.                   } else {
  391.  
  392.  
  393.  
  394. Tue Aug 25 13:35:43 1992                                          Page 6
  395.  
  396.  
  397.  
  398.  
  399. INDENT (1L)            Commands and Applications             INDENT (1L)
  400.  
  401.  
  402.  
  403.                     fprintf (stderr, "...something wrong?");
  404.                   }
  405.              
  406.         With `-br -nce' that code would appear as 
  407.                   if (x > 0) {
  408.                     x--;
  409.                   }
  410.                   else {
  411.                     fprintf (stderr, "...something wrong?");
  412.                   }
  413.              
  414.         The `-cli' option specifies the number of spaces that case 
  415.         labels should be indented to the right of the containing 
  416.         `switch' statement.  
  417.         If a semicolon is on the same line as a `for' or `while' 
  418.         statement, the `-ss' option will cause a space to be placed 
  419.         before the semicolon.  This emphasizes the semicolon, making it 
  420.         clear that the body of the `for' or `while' statement is an 
  421.         empty statement.  `-nss' disables this feature.  
  422.         The `-pcs' option causes a space to be placed between the name 
  423.         of the procedure being called and the `(' (for example, `puts 
  424.         ("Hi");'.  The `-npcs' option would give `puts("Hi");').  
  425.         If the `-cs' option is specified, `indent' puts a space after a 
  426.         cast operator.  
  427.         The `-bs' option ensures that there is a space between the 
  428.         keyword `sizeof' and its argument.  In some versions, this is 
  429.         known as the `Bill_Shannon' option.  
  430.  
  431. DECLARATIONS         
  432.         By default `indent' will line up identifiers, in the column 
  433.         specified by the `-di' option.  For example, `-di16' makes 
  434.         things look like: 
  435.                   int             foo;
  436.                   char           *bar;
  437.              
  438.         Using a small value (such as one or two) for the `-di' option 
  439.         can be used to cause the indentifiers to be placed in the first 
  440.         available position, for example 
  441.                   int foo;
  442.                   char *bar;
  443.              
  444.         The value given to the `-di' option will still affect variables 
  445.         which are put on separate lines from their types, for example 
  446.         `-di2' will lead to 
  447.                   int
  448.                     foo;
  449.              
  450.         If the `-bc' option is specified, a newline is forced after each 
  451.         comma in a declaration.  For example, 
  452.                   int a,
  453.                     b,
  454.                     c;
  455.              
  456.         With the `-nbc' option this would look like 
  457.  
  458.  
  459.  
  460. Tue Aug 25 13:35:43 1992                                          Page 7
  461.  
  462.  
  463.  
  464.  
  465. INDENT (1L)            Commands and Applications             INDENT (1L)
  466.  
  467.  
  468.  
  469.                   int a, b, c;
  470.              
  471.         The `-psl' option causes the type of a procedure being defined 
  472.         to be placed on the line before the name of the procedure.  This 
  473.         style is required for the `etags' program to work correctly, as 
  474.         well as some of the `c-mode' functions of Emacs.  
  475.         If you are not using the `-di1' option to place variables being 
  476.         declared immediately after their type, you need to use the `-T' 
  477.         option to tell `indent' the name of all the typenames in your 
  478.         program that are defined by `typedef'. `-T' can be specified 
  479.         more than once, and all names specified are used.  For example, 
  480.         if your program contains 
  481.                   typedef unsigned long CODE_ADDR;
  482.                   typedef enum {red, blue, green} COLOR;
  483.              
  484.         you would use the options `-T CODE_ADDR -T COLOR'.  
  485.  
  486. INDENTATION         
  487.         One issue in the formatting of code is how far each line should 
  488.         be indented from the left margin.  When the beginning of a 
  489.         statement such as `if' or `for' is encountered, the indentation 
  490.         level is increased by the value specified by the `-i' option.  
  491.         For example, use `-i8' to specify an eight character indentation 
  492.         for each level.  When a statement is continued from a previous 
  493.         line, it is indented by a number of additional spaces specified 
  494.         by the `-ci' option.  `-ci' defaults to 0.  However, if the 
  495.         `-lp' option is specified, and a line has a left parenthesis 
  496.         which is not closed on that line, then continuation lines will 
  497.         be lined up to start at the character position just after the 
  498.         left parenthesis.  This processing also applies to `[' and 
  499.         applies to `{' when it occurs in initialization lists.  For 
  500.         example, a piece of continued code might look like this with 
  501.         `-nlp -ci3' in effect: 
  502.                     p1 = first_procedure (second_procedure (p2, p3),
  503.                        third_procedure (p4, p5));
  504.              
  505.         With `-lp' in effect the code looks somewhat clearer: 
  506.                     p1 = first_procedure (second_procedure (p2, p3),
  507.                                           third_procedure (p4, p5));
  508.              
  509.         `indent' assumes that tabs are placed at regular intervals of 
  510.         both input and output character streams.  These intervals are by 
  511.         default 8 columns wide, but (as of version 1.2) may be changed 
  512.         by the `-ts' option.  Tabs are treated as the equivalent number 
  513.         of spaces.  
  514.         The indentation of type declarations in old-style function 
  515.         definitions is controlled by the `-ip' parameter.  This is a 
  516.         numeric parameter specifying how many spaces to indent type 
  517.         declarations.  For example, the default `-ip5' makes definitions 
  518.         look like this: 
  519.                   char *
  520.                   create_world (x, y, scale)
  521.                        int x;
  522.                        int y;
  523.  
  524.  
  525.  
  526. Tue Aug 25 13:35:43 1992                                          Page 8
  527.  
  528.  
  529.  
  530.  
  531. INDENT (1L)            Commands and Applications             INDENT (1L)
  532.  
  533.  
  534.  
  535.                        float scale;
  536.                   {
  537.                     . . .
  538.                   }
  539.              
  540.         For compatibility with other versions of indent, the option 
  541.         `-nip' is provided, which is equivalent to `-ip0'.  
  542.  
  543. MISCELLANEOUS OPTIONS         
  544.         To find out what version of `indent' you have, use the command 
  545.         `indent -version'. This will report the version number of 
  546.         `indent', without doing any of the normal processing.  
  547.         The `-v' option can be used to turn on verbose mode.  When in 
  548.         verbose mode, `indent' reports when it splits one line of input 
  549.         into two more more lines of output, and gives some size 
  550.         statistics at completion.  
  551.  
  552. COPYRIGHT         
  553.         The following copyright notice applies to the `indent' program.  
  554.         The copyright and copying permissions for this manual appear 
  555.         near the beginning of this document.  
  556.              Copyright (c) 1989, 1992 Free Software Foundation
  557.              Copyright (c) 1985 Sun Microsystems, Inc.
  558.              Copyright (c) 1980 The Regents of the University of California.
  559.              Copyright (c) 1976 Board of Trustees of the University of Illinois.
  560.              All rights reserved.
  561.              
  562.              Redistribution and use in source and binary forms are permitted
  563.              provided that the above copyright notice and this paragraph are
  564.              duplicated in all such forms and that any documentation,
  565.              advertising materials, and other materials related to such
  566.              distribution and use acknowledge that the software was developed
  567.              by the University of California, Berkeley, the University of Illinois,
  568.              Urbana, and Sun Microsystems, Inc.  The name of either University
  569.              or Sun Microsystems may not be used to endorse or promote products
  570.              derived from this software without specific prior written permission.
  571.              THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  572.              IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  573.              WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
  574.              PURPOSE.
  575.  
  576. OPTIONS         
  577.         Here is a list of all the options for `indent', alphabetized by 
  578.         short option.  It is followed by a cross key alphabetized by 
  579.         long option.  
  580.         `-bad'
  581.         `--blank-lines-after-declarations'
  582.              Force blank lines after the declarations.
  583.         
  584.         `-bap'
  585.         `--blank-lines-after-procedures'
  586.              Force blank lines after procedure bodies.
  587.         
  588.         `-bbb'
  589.  
  590.  
  591.  
  592. Tue Aug 25 13:35:43 1992                                          Page 9
  593.  
  594.  
  595.  
  596.  
  597. INDENT (1L)            Commands and Applications             INDENT (1L)
  598.  
  599.  
  600.  
  601.         `--blank-lines-after-block-comments'
  602.              Force blank lines after block comments.
  603.         
  604.         `-bc'
  605.         `--blank-lines-after-commas'
  606.              Force newline after comma in declaration.
  607.         
  608.         `-bl'
  609.         `--braces-after-if-line'
  610.              Put braces on line after `if', etc.
  611.         
  612.         `-bliN'
  613.         `--brace-indentN'
  614.              Indent braces N spaces.
  615.         
  616.         `-br'
  617.         `--braces-on-if-line'
  618.              Put braces on line with `if', etc.
  619.         
  620.         `-cN'
  621.         `--comment-indentationN'
  622.              Put comments to the right of code in column N.
  623.         
  624.         `-cdN'
  625.         `--declaration-comment-columnN'
  626.              Put comments to the right of the declarations in column N.
  627.         
  628.         `-cdb'
  629.         `--comment-delimiters-on-blank-lines'
  630.              Put comment delimiters on blank lines.
  631.         
  632.         `-ce'
  633.         `--cuddle-else'
  634.              Cuddle else and preceeding `}'.
  635.         
  636.         `-ciN'
  637.         `--continuation-indentationN'
  638.              Continuation indent of N spaces.
  639.         
  640.         `-cliN'
  641.         `--case-indentationN'
  642.              Case label indent of N spaces.
  643.         
  644.         `-cpN'
  645.         `--else-endif-columnN'
  646.              Put comments to the right of `#else' and `#endif' statements in
  647.              column N.
  648.         
  649.         `-cs'
  650.         `--space-after-cast'
  651.              Put a space after a cast operator.
  652.         
  653.         `-bs'
  654.         `--blank-before-sizeof'
  655.  
  656.  
  657.  
  658. Tue Aug 25 13:35:43 1992                                         Page 10
  659.  
  660.  
  661.  
  662.  
  663. INDENT (1L)            Commands and Applications             INDENT (1L)
  664.  
  665.  
  666.  
  667.              Put a space between `sizeof' and its argument.
  668.         
  669.         `-dN'
  670.         `--line-comments-indentationN'
  671.              Set indentation of comments not to the right of code to N spaces.
  672.         
  673.         `-diN'
  674.         `--declaration-indentationN'
  675.              Put variables in column N.
  676.         
  677.         `-fc1'
  678.         `--format-first-column-comments'
  679.              Format comments in the first column.
  680.         
  681.         `-fca'
  682.         `--format-all-comments'
  683.              Do not disable all formatting of comments.
  684.         
  685.         `-gnu'
  686.         `--gnu-style'
  687.              Use GNU coding style.  This is the default.
  688.         
  689.         `-iN'
  690.         `--indent-levelN'
  691.              Set indentation level to N spaces.
  692.         
  693.         `-ipN'
  694.         `--parameter-indentationN'
  695.              Indent parameter types in old-style function definitions by N
  696.              spaces.
  697.         
  698.         `-kr'
  699.         `--k-and-r-style'
  700.              Use Kernighan & Ritchie coding style.
  701.         
  702.         `-lN'
  703.         `--line-lengthN'
  704.              Set maximum line length to N.
  705.         
  706.         `-lp'
  707.         `--continue-at-parentheses'
  708.              Line up continued lines at parentheses.
  709.         
  710.         `-nbad'
  711.         `--no-blank-lines-after-declarations'
  712.              Do not force blank lines after declarations.
  713.         
  714.         `-nbap'
  715.         `--no-blank-lines-after-procedures'
  716.              Do not force blank lines after procedure bodies.
  717.         
  718.         `-nbbb'
  719.         `--no-blank-lines-after-block-comments'
  720.              Do not force blank-lines after block comments.
  721.  
  722.  
  723.  
  724. Tue Aug 25 13:35:43 1992                                         Page 11
  725.  
  726.  
  727.  
  728.  
  729. INDENT (1L)            Commands and Applications             INDENT (1L)
  730.  
  731.  
  732.  
  733.         
  734.         `-nbc'
  735.         `--no-blank-lines-after-commas'
  736.              Do not force newlines after commas in declarations.
  737.         
  738.         `-ncdb'
  739.         `--no-comment-delimiters-on-blank-lines'
  740.              Do not put comment delimiters on blank lines.
  741.         
  742.         `-nce'
  743.         `--dont-cuddle-else'
  744.              Do not cuddle `}' and `else'.
  745.         
  746.         `-ncs'
  747.         `--no-space-after-casts'
  748.              Do not put a space after cast operators.
  749.         
  750.         `-nfc1'
  751.         `--dont-format-first-column-comments'
  752.              Do not format comments in the first column as normal.
  753.         
  754.         `-nfca'
  755.         `--dont-format-comments'
  756.              Do not format any comments.
  757.         
  758.         `-nip'
  759.         `--no-parameter-indentation'
  760.              Zero width indentation for parameters.
  761.         
  762.         `-nlp'
  763.         `--dont-line-up-parentheses'
  764.              Do not line up parentheses.
  765.         
  766.         `-npcs'
  767.         `--no-space-after-function-call-names'
  768.              Do not put space after the function in function calls.
  769.         
  770.         `-npsl'
  771.         `--dont-break-procedure-type'
  772.              Put the type of a procedure on the same line as its name.
  773.         
  774.         `-nsc'
  775.         `--dont-star-comments'
  776.              Do not put the `*' character at the left of comments.
  777.         
  778.         `-nsob'
  779.         `--leave-optional-blank-lines'
  780.              Do not swallow optional blank lines.
  781.         
  782.         `-nss'
  783.         `--dont-space-special-semicolon'
  784.              Do not force a space before the semicolon after certain statements.
  785.              Disables `-ss'.
  786.         
  787.  
  788.  
  789.  
  790. Tue Aug 25 13:35:43 1992                                         Page 12
  791.  
  792.  
  793.  
  794.  
  795. INDENT (1L)            Commands and Applications             INDENT (1L)
  796.  
  797.  
  798.  
  799.         `-nv'
  800.         `--no-verbosity'
  801.         
  802.         `-orig'
  803.         `--original'
  804.              Use the original Berkeley coding style.
  805.         
  806.         `-npro'
  807.         `--ignore-profile'
  808.              Do not read `.indent.pro' files.
  809.         
  810.         `-pcs'
  811.         `--space-after-procedure-calls'
  812.              Insert a space between the name of the procedure being called and
  813.              the `('.
  814.         
  815.         `-psl'
  816.         `--procnames-start-lines'
  817.              Put the type of a procedure on the line before its name.
  818.         
  819.         `-sc'
  820.         `--start-left-side-of-comments'
  821.              Put the `*' character at the left of comments.
  822.         
  823.         `-sob'
  824.         `--swallow-optional-blank-lines'
  825.              Swallow optional blank lines.
  826.         
  827.         `-ss'
  828.         `--space-special-semicolon'
  829.              On one-line `for' and `while' statments, force a blank before the
  830.              semicolon.
  831.         
  832.         `-st'
  833.         `--standard-output'
  834.              Write to standard output.
  835.         
  836.         `-T'
  837.              Tell `indent' the name of typenames.
  838.         
  839.         `-tsN'
  840.         `--tab-sizeN'
  841.              Set tab size to N spaces.
  842.         
  843.         `-v'
  844.         `--verbose'
  845.              Enable verbose mode.
  846.         
  847.         `-version'
  848.              Output the version number of `indent'.
  849.         
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856. Tue Aug 25 13:35:43 1992                                         Page 13
  857.  
  858.  
  859.  
  860.  
  861. INDENT (1L)            Commands and Applications             INDENT (1L)
  862.  
  863.  
  864.  
  865. OPTIONS CROSS-REFERENCE         
  866.         Here is a list of options alphabetized by long option, to help 
  867.         you find the corresponding short option.  
  868.                   --blank-lines-after-block-comments              -bbb
  869.                   --blank-lines-after-commas                      -bc
  870.                   --blank-lines-after-declarations                -bad
  871.                   --blank-lines-after-procedures                  -bap
  872.                   --braces-after-if-line                          -bl
  873.                   --brace-indent                                  -bli
  874.                   --braces-on-if-line                             -br
  875.                   --case-indentation                              -cliN
  876.                   --comment-delimiters-on-blank-lines             -cdb
  877.                   --comment-indentation                           -cN
  878.                   --continuation-indentation                      -ciN
  879.                   --continue-at-parentheses                       -lp
  880.                   --cuddle-else                                   -ce
  881.                   --declaration-comment-column                    -cdN
  882.                   --declaration-indentation                       -diN
  883.                   --dont-break-procedure-type                     -npsl
  884.                   --dont-cuddle-else                              -nce
  885.                   --dont-format-comments                          -nfca
  886.                   --dont-format-first-column-comments             -nfc1
  887.                   --dont-line-up-parentheses                      -nlp
  888.                   --dont-space-special-semicolon                  -nss
  889.                   --dont-star-comments                            -nsc
  890.                   --else-endif-column                             -cpN
  891.                   --format-all-comments                           -fca
  892.                   --format-first-column-comments                  -fc1
  893.                   --gnu-style                                     -gnu
  894.                   --ignore-profile                                -npro
  895.                   --indent-level                                  -iN
  896.                   --k-and-r-style                                 -kr
  897.                   --leave-optional-blank-lines                    -nsob
  898.                   --line-comments-indentation                     -dN
  899.                   --line-length                                   -lN
  900.                   --no-blank-lines-after-block-comments           -nbbb
  901.                   --no-blank-lines-after-commas                   -nbc
  902.                   --no-blank-lines-after-declarations             -nbad
  903.                   --no-blank-lines-after-procedures               -nbap
  904.                   --no-comment-delimiters-on-blank-lines          -ncdb
  905.                   --no-space-after-casts                          -ncs
  906.                   --no-parameter-indentation                      -nip
  907.                   --no-space-after-function-call-names            -npcs
  908.                   --no-verbosity                                  -nv
  909.                   --original                                      -orig
  910.                   --parameter-indentation                         -ipN
  911.                   --procnames-start-lines                         -psl
  912.                   --space-after-cast                              -cs
  913.                   --space-after-procedure-calls                   -pcs
  914.                   --space-special-semicolon                       -ss
  915.                   --standard-output                               -st
  916.                   --start-left-side-of-comments                   -sc
  917.                   --swallow-optional-blank-lines                  -sob
  918.                   --tab-size                                      -tsN
  919.  
  920.  
  921.  
  922. Tue Aug 25 13:35:43 1992                                         Page 14
  923.  
  924.  
  925.  
  926.  
  927. INDENT (1L)            Commands and Applications             INDENT (1L)
  928.  
  929.  
  930.  
  931.                   --verbose                                       -v
  932.              
  933.  
  934. RETURN VALUE         
  935.         Unknown 
  936.  
  937. FILES         
  938.         $HOME/.indent.pro    holds default options for indent.
  939.  
  940. AUTHOR        
  941.         The Free Software Foundation.
  942.  
  943. HISTORY        
  944.         Derived from the UCB program "indent".
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988. Tue Aug 25 13:35:43 1992                                         Page 15
  989.  
  990.  
  991.